<template>
	<!-- <office-pdf :src="pdfSrc" :show-toolbar="true" @rendered="handlePdfRender" style="height: 100%"></office-pdf> -->
	<office-docx :src="docxPath" :options="editorOptions"></office-docx>
	<!-- <office-excel :src="excelPath"></office-excel> -->
</template>

<script>
import officePdf from '@vue-office/pdf';
import officeDocx from '@vue-office/docx';
import officeExcel from '@vue-office/excel';
import '@vue-office/docx/lib/index.css';
import '@vue-office/excel/lib/index.css';
export default {
	components: { officePdf, officeDocx, officeExcel },
	data() {
		return {
			excelPath: '/test.xlsx',
			docxPath: '/test.docx',
			pdfSrc: '/test.pdf',
			editorOptions: {
				toolbar: true,
				width: '800px',
				height: '600px'
			}
		};
	},
	mounted() {
		console.log(officeDocx);
	},
	methods: {
		handleDocumentLoaded(data) {
			console.log(data);
		},
		handlePdfRender() {
			console.log('pdf rendered');
		}
	}
};
</script>

<style scoped></style>
